<?php
namespace Amis\form;
class InputExcel extends FormItem
{
    public string $type = 'input-excel';

    /**
     * 是否解析所有 sheet
     * @param bool $allSheets
     * @return $this
     */
    public function allSheets(bool $allSheets = false)
    {
        $this->allSheets = $allSheets;
        return $this;
    }

    /**
     * @param string $parseMode 解析模式 'array' 或 'object'
     * @return $this
     */
    public function parseMode(string $parseMode = 'array')
    {
        $this->parseMode = $parseMode;
        return $this;
    }

    /**
     * 是否包含空值
     * @param bool $includeEmpty
     * @return $this
     */
    public function includeEmpty(bool $includeEmpty = true)
    {
        $this->includeEmpty = $includeEmpty;
        return $this;
    }

    /**
     * 是否解析为纯文本
     * @param bool $plainText
     * @return $this
     */
    public function plainText(bool $plainText = true)
    {
        $this->plainText = $plainText;
        return $this;
    }
}